There are multiple ways to define time to clearance. Time to first 40 is the easiest.
Plot data - those with vaccination status
## [1] 0.2407676
mgcv
## Warning in predict.gam(mod_gam, data.frame(time = xs, ID = -1), re.effect = NA): ## factor levels -1 not in original fit